<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:c="http://java.sun.com/jsp/jstl/core">
    <head>
        <title>Twatter</title>
        <link rel="stylesheet" type="text/css" href="main.css"></link>
    </head>
    <body>
        <h:body>
            <div>
            <label for="twatters">#{loginenter.userVisit}'s Twats</label><br/>
            <ul>
            <h:form>
                 <h:commandButton action="#{loginenter.closeSession()}"  value="Logout" />
            </h:form>
            <c:forEach items="#{messaging.getTwats(loginenter.userVisit)}" var="twat">
                <div>
                    <h:form id="twatters">
                        <br/>
                        <li><h:outputText value="#{twat.getText()}" /></li><br/>     
                        <ul><c:forEach items="#{messaging.getTwatReplies(loginenter.userId,twat.getId())}" var="twatrep">
                            <li><h:outputText value="#{twatrep.getText()}" /></li><br/>
                        </c:forEach>
                        </ul>
                    </h:form>
                   
                </div>
            </c:forEach>
            </ul>
        </div>
        </h:body>
    </body>
</html>
